using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_ShopApplicationTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_ApplicationTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_ApplicationTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_Application";
			dataTableMapping.ColumnMappings.Add("IdentifyID", "IdentifyID");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("UserName", "UserName");
			dataTableMapping.ColumnMappings.Add("IdentifyType", "IdentifyType");
			dataTableMapping.ColumnMappings.Add("Status", "Status");
			dataTableMapping.ColumnMappings.Add("AplayTime", "AplayTime");
			dataTableMapping.ColumnMappings.Add("UpdateTime", "UpdateTime");
			dataTableMapping.ColumnMappings.Add("Editor", "Editor");
			dataTableMapping.ColumnMappings.Add("Remark", "Remark");
			dataTableMapping.ColumnMappings.Add("UploadPhotoUrl", "UploadPhotoUrl");
			dataTableMapping.ColumnMappings.Add("IdentifyDetail", "IdentifyDetail");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_Application] WHERE (([IdentifyID] = @Original_IdentifyID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_IdentifyID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "IdentifyID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_Application] ([UserID], [UserName], [IdentifyType], [Status], [AplayTime], [UpdateTime], [Editor], [Remark], [UploadPhotoUrl], [IdentifyDetail]) VALUES (@UserID, @UserName, @IdentifyType, @Status, @AplayTime, @UpdateTime, @Editor, @Remark, @UploadPhotoUrl, @IdentifyDetail)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IdentifyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "IdentifyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@AplayTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "AplayTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "UpdateTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Editor", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Editor", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UploadPhotoUrl", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UploadPhotoUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IdentifyDetail", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "IdentifyDetail", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_Application] SET [UserID] = @UserID, [UserName] = @UserName, [IdentifyType] = @IdentifyType, [Status] = @Status, [AplayTime] = @AplayTime, [UpdateTime] = @UpdateTime, [Editor] = @Editor, [Remark] = @Remark, [UploadPhotoUrl] = @UploadPhotoUrl, [IdentifyDetail] = @IdentifyDetail WHERE (([IdentifyID] = @Original_IdentifyID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IdentifyType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "IdentifyType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@AplayTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "AplayTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "UpdateTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Editor", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Editor", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UploadPhotoUrl", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UploadPhotoUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IdentifyDetail", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "IdentifyDetail", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_IdentifyID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "IdentifyID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[4];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT IdentifyID, UserID, UserName, IdentifyType, Status, AplayTime, UpdateTime, \r\n      Editor, Remark, UploadPhotoUrl, IdentifyDetail\r\nFROM HLShop_Application";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT IdentifyID, UserID, UserName, IdentifyType, Status, AplayTime, UpdateTime, \r\n      Editor, Remark, UploadPhotoUrl, IdentifyDetail\r\nFROM HLShop_Application\r\nWHERE UserID=@UserID AND IdentifyType=@IdentifyType";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[1].Parameters.Add(new SqlParameter("@IdentifyType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "IdentifyType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT IdentifyID, UserID, UserName, IdentifyType, Status, AplayTime, UpdateTime, \r\n      Editor, Remark, UploadPhotoUrl, IdentifyDetail\r\nFROM HLShop_Application\r\nWHERE IdentifyID=@IdentifyID";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@IdentifyID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "IdentifyID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "\r\n                      SELECT IdentifyID, UserID, UserName, IdentifyType, Status, AplayTime, UpdateTime, Remark\r\n                      FROM HLShop_Application\r\n                      WHERE UserID=@UserID";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopApplication.HLShop_ApplicationDataTable GetAllApplication()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_ShopApplication.HLShop_ApplicationDataTable hLShop_ApplicationDataTable = new S_ShopApplication.HLShop_ApplicationDataTable();
			this.Adapter.Fill(hLShop_ApplicationDataTable);
			return hLShop_ApplicationDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopApplication.HLShop_ApplicationDataTable GetApplicationByUserIDTypeID(int? UserID, int? IdentifyType)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (IdentifyType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = IdentifyType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			S_ShopApplication.HLShop_ApplicationDataTable hLShop_ApplicationDataTable = new S_ShopApplication.HLShop_ApplicationDataTable();
			this.Adapter.Fill(hLShop_ApplicationDataTable);
			return hLShop_ApplicationDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopApplication.HLShop_ApplicationDataTable GetApplicationByIdentifyID(int IdentifyID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			this.Adapter.SelectCommand.Parameters[0].Value = IdentifyID;
			S_ShopApplication.HLShop_ApplicationDataTable hLShop_ApplicationDataTable = new S_ShopApplication.HLShop_ApplicationDataTable();
			this.Adapter.Fill(hLShop_ApplicationDataTable);
			return hLShop_ApplicationDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_ShopApplication.HLShop_ApplicationDataTable GetApplicationTimeStatusByUserID(int? UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_ShopApplication.HLShop_ApplicationDataTable hLShop_ApplicationDataTable = new S_ShopApplication.HLShop_ApplicationDataTable();
			this.Adapter.Fill(hLShop_ApplicationDataTable);
			return hLShop_ApplicationDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_ShopApplication.HLShop_ApplicationDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_ShopApplication dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_Application");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
	}
}
